<?php
/**
 *  💡 免责声明：本软件不得用于商业用途，仅做学习交流
 *  ⚠️ 权利声明：本软件由版权人提供产品技术支持
 *  📅 项目编号：NX2025-0135
 */
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateWithdrawCashSettingsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('withdraw_cash_settings', function (Blueprint $table) {
            $table->id();
            $table->text('explanation')->nullable()->comment('说明');
            $table->decimal('fee', 6, 2)->default(0)->comment('提现手续费');
            $table->decimal('bean', 6, 2)->default(0)->comment('提现KC通证');
            $table->decimal('transfer_others_fee', 8, 2)->default(0)->comment('转账他人手续费');
            $table->decimal('transfer_others_bean', 8, 2)->default(0)->comment('转账他人KC通证');
            $table->decimal('transfer_wallet_fee', 8, 2)->default(0)->comment('转账到钱包手续费');
            $table->decimal('transfer_wallet_bean', 8, 2)->default(0)->comment('转账到钱包KC通证');
            $table->timestamps();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `withdraw_cash_settings` comment '转账配置'");
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('withdraw_cash_settings');
    }
}
